Breeze SaveChanges partial fail -


i'm thinking @ following scenario: on client-side update 2 entities , submit post json bundle. on server side interception , apply business logic. save works 1 of entities, other 1 fails. in opinion correct solution , why: 1. should rollback , return exception on client, or 2. commit update 1st entity , return message save worked 1 of entities? know guys ideablade consider savechanges single transaction(so crud functionality goes in single post), judging think 1. should correct approach. appreciate reasoned opinions.thanks!

well depends on doing. bet save lot of time developing if roll back. if want though, can return list of failed , successful entities saved. user (assuming errors user errors) can make changes on errored entities , commit them again. may become difficult though. breeze attaches a state each entity, need need manage. on response, you'll need figure out entities failed , succeeded, update state on client, otherwise you'll resubmit commits don't need to. think better investment on time put business logic on client, roll on server (and log event can fix it) rare occasions errors occur. help?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -