Skip to content

Instantly share code, notes, and snippets.

@FredrikBitio
Forked from RichoDemus/gist:3d5bd0dc1fea1d072cb5
Last active August 29, 2015 14:08
Show Gist options
  • Save FredrikBitio/ca5f81dd96275fd45388 to your computer and use it in GitHub Desktop.
Save FredrikBitio/ca5f81dd96275fd45388 to your computer and use it in GitHub Desktop.
public class backendKlass
{
public static Users[] getUsers()
{
using (entity db = new entity())
{
Users[] list = db.getUsers(); /* stored procedure i db */
list = formatUsers(list);
return list;
}
}
public Users[] formatUsers(list)
{
/* gör något */
return list;
}
}
public class Controller
{
public PartialView Users(){
Users[] list = backendKlass.getUsers();
return RenderPartialView(UserView, list);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment