asp.net mvc - Breeze Todo Example - Why does the TodosController return a string on purge and reset? -


i'm going on todos example in breeze angular , have question unable find answer for.

why todoscontroller return string on both purge , reset? doesn't seem matter if return string, null, or nothing @ all...

code snippet:

    // ~/breeze/todos/purge     [httppost]     public string purge()     {         tododatabaseinitializer.purgedatabase(_contextprovider.context);         return "purged";     }      // ~/breeze/todos/reset     [httppost]     public string reset()     {         purge();         tododatabaseinitializer.seeddatabase(_contextprovider.context);         return "reset";     } 

thanks! aj

you correct, not matter, in fact thi call has more entity framework breeze. string message clarity , can nice if using tool fiddler, shows http requests , information them. in case, see purged in http response body in fiddler, know call succeeded. doesn't it's used on client though.


Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -